home *** CD-ROM | disk | FTP | other *** search
/ PC World 2000 February / PCWorld_2000-02_cd.bin / Software / Vyzkuste / xsetup / _SETUP.2 / Group3 / XQ NeoPlanet Search.xpl < prev    next >
Text File  |  1999-08-30  |  3KB  |  102 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 5.0"
  2. "TYPE"="1"
  3. "COUNT"="4"
  4. "UIPATH"="Internet\NeoPlanet"
  5. "NAME"="NeoPlanet Search URLs"
  6. "VERSION"="1.10"
  7. "LANGUAGE"="VBScript"
  8. "TEXT 1"="Search #1 Name"
  9. "TEXT 2"="Search #1 URL"
  10. "TEXT 3"="Search #2 Name"
  11. "TEXT 4"="Search #2 URL"
  12. "DESCRIPTION 1"="In the box above, enter the website address you wish to use for the NeoPlanet default search pages."
  13. "DESCRIPTION 2"="The first default URL is http://www.hotbot.com/?MT=%s&SM=SC&DV=0&LG=any&DC=25&DE=2 and the first default name is "Search HotBot""
  14. "DESCRIPTION 3"="The second default URL is http://www.lycos.com/cgi-bin/pursuit?cat=dir&query=%s and the second default name is "Search Lycos""
  15. "DESCRIPTION 4"="You may copy and paste those items into the boxes above to restore the default search engine names and search pages in NeoPlanet."
  16. "DESCRIPTION 5"="Note: These changes affect the drop down search list in NeoPlanet, not the button labled "Search"."
  17. "DESCRIPTION 6"="You should completely exit NeoPlanet, including its taskbar tray icon and restart it for the changes to take effect."
  18. "DESCRIPTION 7"="NeoPlanet is free web browser, available at www.neoplanet.com for download."
  19. "AUTHOR"="CptSiskoX"
  20. "COPYRIGHT"="(C) 1999 by Xteq Systems"
  21. "COMMENT 1"="Thanks to NeoPlanet for creating a cool and free web browser.  If you don't have it, check out http://www.neoplanet.com and grab a copy."
  22. "COMMENT 2"="Thanks to TeXHeX@xteq.com for helping out."
  23.  
  24.  
  25. sFile="data\data\Default\search.ini"
  26. sFilePath=""
  27.  
  28. sSec1="search1"
  29. sSec2="search2"
  30.  
  31. sV_Name="display"
  32. sV_URL="URL"
  33.  
  34.  
  35. 'Called when the Plugin is started
  36. SUB Plugin_Initialize
  37.  'first try to locate NeoPlanet...
  38.  s=RegReadValue("HKLM\Software\CLASSES\Neo20.Application\shell\open\command\@")
  39.  if len(s)>0 then
  40.     'NP is installed! default result: "C:\PROGRA~1\NEOPLA~1\BIN\NEOPLA~1.EXE "%1"
  41.     'locate the \BIN part and drop the rest
  42.     s=UCase(s) 
  43.     l=InStr(s,"\BIN")    
  44.     if l>0 then
  45.        'looks good!
  46.        s=left(s,l) 'no we have the root
  47.        s=s & sFile 'add the name and path to "search.INI"
  48.  
  49.        sFilePath=s
  50.        'Call DebugMsg(s)
  51.  
  52.        'Final check: Does the file exists?
  53.        if FileExists(sFilePath)then 
  54.  
  55.           'Yiah! We have the file....
  56.           s=INIReadValue(sFilePath,sSec1,sV_Name)
  57.           Call SetUIElement(1,s)
  58.           s=INIReadValue(sFilePath,sSec1,sV_URL)
  59.           Call SetUIElement(2,s)
  60.  
  61.           s=INIReadValue(sFilePath,sSec2,sV_Name)
  62.           Call SetUIElement(3,s)
  63.           s=INIReadValue(sFilePath,sSec2,sV_URL)
  64.           Call SetUIElement(4,s)
  65.  
  66.        else
  67.           Call Disable()
  68.        end if
  69.     else
  70.        Call Disable()
  71.     end if
  72.  else
  73.     Call Disable()
  74.  end if
  75.  
  76.  
  77. END SUB
  78.  
  79. 'Called when the Plugin should validate the Data the user has entered
  80. SUB Plugin_CheckData(ElementIndex)
  81. END SUB
  82.  
  83. 'Called when the Plugin should apply the changes
  84. SUB Plugin_Apply(ElementIndex,ElementSubIndex)
  85.  s=GetUIElement(1)
  86.  Call INIWriteValue(sFilePath,sSec1,sV_Name,s)
  87.  s=GetUIElement(2)
  88.  Call INIWriteValue(sFilePath,sSec1,sV_URL,s)
  89.  
  90.  
  91.  s=GetUIElement(3)
  92.  Call INIWriteValue(sFilePath,sSec2,sV_Name,s)
  93.  s=GetUIElement(4)
  94.  Call INIWriteValue(sFilePath,sSec2,sV_URL,s)
  95.   
  96. END SUB
  97.  
  98. 'Called when the Plugin is about to be removed from memory
  99. SUB Plugin_Terminate
  100. END SUB
  101.  
  102.